<?php
    public class StatsProtocol
    {
        private $result_;

        /**
         * Gets a page and returns the html code
         * @param htmlCode
         *   html page
         * @return result_
         *   the html code
         */
        public function getHtmlCode($htmlCode)
        {
        	$ch = curl_init(); 
       		curl_setopt($ch, CURLOPT_URL, $htmlCode); 
        	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
        	curl_setopt($ch, CURLOPT_POST, false); 
       	 	curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0"); 
 		curl_setopt($ch, CURLOPT_HTTPHEADER, array (
        	"Content-Type: text/xml; charset=utf-8",
    		));
		if(curl_exec($ch) == false)
		{
    			return -1; 
		} else {
        		$this->result_ = curl_exec($ch); 
        		curl_close($ch);      
        		return $this->result_;
		}
        }
    }
?>
